<?php
namespace GRH\Model;

class Employe
{
    public $employe_id;
    public $nom;
    public $prenom;
    public $login;
    public $mdp;
    public $adresse1;
    public $adresse2;
    public $date_naissance;
    public $lieu_naissance;
    public $nationalite;
    public $titre_sejour;
    public $num_titre_sejour;
    public $num_cpam;
    public $num_telephone;
    public $num_mobile;
    public $email;
    public $situation_famille;
    public $mutuelle;
    public $num_pole_emploi;
    public $contrat_id;
    public $transport_id;
    public $type_employe_id;
    public $fiche_medical;

    public function exchangeArray($data)
    {
        $this->employe_id           = isset($data['employe_id'])            ? $data['employe_id']       : null;
        $this->nom                  = isset($data['nom'])                   ? $data['nom']              : null;
        $this->prenom               = isset($data['prenom'])                ? $data['prenom']           : null;
        $this->login                = isset($data['login'])                 ? $data['login']            : null;
        $this->mdp                  = isset($data['mdp'])                   ? $data['mdp']              : null;
        $this->adresse1             = isset($data['adresse1'])              ? $data['adresse1']         : null;
        $this->adresse2             = isset($data['adresse2'])              ? $data['adresse2']         : null;
        $this->date_naissance       = isset($data['date_naissance'])        ? $data['date_naissance']   : null;
        $this->lieu_naissance       = isset($data['lieu_naissance'])        ? $data['lieu_naissance']   : null;
        $this->nationalite          = isset($data['nationalite'])           ? $data['nationalite']      : null;
        $this->titre_sejour         = isset($data['titre_sejour'])          ? $data['titre_sejour']     : null;
        $this->num_titre_sejour     = isset($data['num_titre_sejour'])      ? $data['num_titre_sejour'] : null;
        $this->num_cpam             = isset($data['num_cpam'])              ? $data['num_cpam']         : null;
        $this->num_telephone        = isset($data['num_telephone'])         ? $data['num_telephone']    : null;
        $this->num_mobile           = isset($data['num_mobile'])            ? $data['num_mobile']       : null;
        $this->email                = isset($data['email'])                 ? $data['email']            : null;
        $this->situation_famille    = isset($data['situation_famille'])     ? $data['situation_famille']: null;
        $this->mutuelle             = isset($data['mutuelle'])              ? $data['mutuelle']         : null;
        $this->num_pole_emploi      = isset($data['num_pole_emploi'])       ? $data['num_pole_emploi']  : null;
        $this->contrat_id           = isset($data['contrat_id'])            ? $data['contrat_id']       : null;
        $this->transport_id         = isset($data['transport_id'])          ? $data['transport_id']     : null;
        $this->type_employe_id      = isset($data['type_employe_id'])       ? $data['type_employe_id']  : null;
        $this->fiche_medical        = isset($data['fiche_medical'])         ? $data['fiche_medical']    : null;
    }
    
    public function getArrayCopy()
    {
        return get_object_vars($this);
    }
}